home *** CD-ROM | disk | FTP | other *** search
/ Remix Doll 3: Dirty Sally / Remix Doll 3: Dirty Sally.iso / drtyslly.exe / MAIN_FNL.DXR / 04956_TTapeLayer.ls < prev    next >
Encoding:
Text File  |  1995-02-11  |  1.4 KB  |  63 lines

  1. property ancestor, fTapeTable, fTapeList
  2. global kNumRooms, kNumGirlsInRoom, kRoomNames
  3.  
  4. on birth me
  5.   set ancestor to NewObj("TLayer")
  6.   mITapeLayer(me)
  7.   return me
  8. end
  9.  
  10. on mITapeLayer me
  11.   mITapes(me)
  12.   mITapeTable(me)
  13. end
  14.  
  15. on mITapes me
  16.   set fTapeList to []
  17.   set aSpr to 37
  18.   repeat with aTapeCount = 1 to kNumRooms * kNumGirlsInRoom
  19.     set aTape to mNewView(me, "TTape", aSpr + aTapeCount - 1, "Tape" & aTapeCount)
  20.     add(fTapeList, aTape)
  21.     mOffStage(aTape)
  22.   end repeat
  23.   updateStage()
  24. end
  25.  
  26. on mITapeTable me
  27.   set fTapeTable to [#temp: 0]
  28.   repeat with aRoomCount = 1 to kNumRooms
  29.     set aRoomName to getAt(kRoomNames, aRoomCount)
  30.     addProp(fTapeTable, "#" & aRoomName, [0, 0, 0, 0])
  31.   end repeat
  32. end
  33.  
  34. on mIsDeadCkrch me, vRoomName, vCkrchNum
  35.   set aCkrchList to getaProp(fTapeTable, "#" & vRoomName)
  36.   if getAt(aCkrchList, vCkrchNum) = 1 then
  37.     return 1
  38.   else
  39.     return 0
  40.   end if
  41. end
  42.  
  43. on mHitCkrch me, aRoomName, aCkrchNum
  44.   set aCkrchList to getaProp(fTapeTable, "#" & aRoomName)
  45.   setAt(aCkrchList, aCkrchNum, 1)
  46.   setProp(fTapeTable, "#" & aRoomName, aCkrchList)
  47.   mPutTapeOnStage(me, aRoomName, aCkrchNum)
  48. end
  49.  
  50. on mPutTapeOnStage me, vRoomName, vCkrchNum
  51.   mAppearTape(mGtEmptyTape(me), vRoomName, vCkrchNum)
  52. end
  53.  
  54. on mGtEmptyTape me
  55.   repeat with aTapeCount = 1 to count(fTapeList)
  56.     set aTape to getAt(fTapeList, aTapeCount)
  57.     if not mIsExistOnStage(aTape) then
  58.       return aTape
  59.     end if
  60.   end repeat
  61.   return 0
  62. end
  63.